#pragma once
#include "Shader.h"

namespace Graphics
{
	class Light;
	class Model;
	class Camera;
	class Buffer;
	class Texture;
}

namespace Graphics
{
class LightShader : public Shader
{
private:
	RTTI_DECLARATIONS(LightShader, Shader)

private:
	struct CameraBufferType
	{
		D3DXVECTOR3 CameraPosition;
		float Padding;
	};

public:
	LightShader(void);
	virtual ~LightShader(void);
	bool Initialize();
	void Deinitialize();
	bool Render(int indexCount, D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, Camera* camera, Light* light, Texture* texture);

private:
	bool InitializeShader(HWND winHandle, const char* vertexShaderName, const char*  pixelShaderName);
	void DeinitializeShader();
	bool SetShaderParameters(D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX projectionMatrix, Camera* camera, Light* light, Texture* texture);

private:
	Buffer* mLightBuffer;
	Buffer* mCameraBuffer;
};
}